package com.miracle9.game.bean;

import java.util.Arrays;

public class Pager
{
  private int pageNumber = 1;
  private int pageSize = 10;
  private int totalCount = 0;
  private int pageCount = 0;
  private String orderBy = "";
  private String order = "";
  private Object[] list;
  
  public int getPageNumber()
  {
    return this.pageNumber;
  }
  
  public void setPageNumber(int pageNumber)
  {
    this.pageNumber = pageNumber;
  }
  
  public int getPageSize()
  {
    return this.pageSize;
  }
  
  public void setPageSize(int pageSize)
  {
    this.pageSize = pageSize;
  }
  
  public int getTotalCount()
  {
    return this.totalCount;
  }
  
  public void setTotalCount(int totalCount)
  {
    this.totalCount = totalCount;
    this.pageCount = (totalCount / this.pageSize);
    if (totalCount % this.pageSize > 0) {
      this.pageCount += 1;
    }
  }
  
  public int getPageCount()
  {
    return this.pageCount;
  }
  
  public void setPageCount(int pageCount)
  {
    this.pageCount = pageCount;
  }
  
  public String getOrderBy()
  {
    return this.orderBy;
  }
  
  public void setOrderBy(String orderBy)
  {
    this.orderBy = orderBy;
  }
  
  public Object[] getList()
  {
    return this.list;
  }
  
  public void setList(Object[] list)
  {
    this.list = list;
  }
  
  public String getOrder()
  {
    return this.order;
  }
  
  public void setOrder(String order)
  {
    this.order = order;
  }
  
  public String toString()
  {
    return 
    

      "Pager [pageNumber=" + this.pageNumber + ", pageSize=" + this.pageSize + ", totalCount=" + this.totalCount + ", pageCount=" + this.pageCount + ", orderBy=" + this.orderBy + ", order=" + this.order + ", list=" + Arrays.toString(this.list).toString() + "]";
  }
}
